\(\int x \cosh ^2(a+b x^2) \, dx\) [10]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 31 \[ \int x \cosh ^2\left (a+b x^2\right ) \, dx=\frac {x^2}{4}+\frac {\cosh \left (a+b x^2\right ) \sinh \left (a+b x^2\right )}{4 b} \]

[Out]

1/4*x^2+1/4*cosh(b*x^2+a)*sinh(b*x^2+a)/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5429, 2715, 8} \[ \int x \cosh ^2\left (a+b x^2\right ) \, dx=\frac {\sinh \left (a+b x^2\right ) \cosh \left (a+b x^2\right )}{4 b}+\frac {x^2}{4} \]

[In]

Int[x*Cosh[a + b*x^2]^2,x]

[Out]

x^2/4 + (Cosh[a + b*x^2]*Sinh[a + b*x^2])/(4*b)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 5429

Int[((a_.) + Cosh[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Cosh[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Sim
plify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \cosh ^2(a+b x) \, dx,x,x^2\right ) \\ & = \frac {\cosh \left (a+b x^2\right ) \sinh \left (a+b x^2\right )}{4 b}+\frac {1}{4} \text {Subst}\left (\int 1 \, dx,x,x^2\right ) \\ & = \frac {x^2}{4}+\frac {\cosh \left (a+b x^2\right ) \sinh \left (a+b x^2\right )}{4 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.87 \[ \int x \cosh ^2\left (a+b x^2\right ) \, dx=\frac {2 \left (a+b x^2\right )+\sinh \left (2 \left (a+b x^2\right )\right )}{8 b} \]

[In]

Integrate[x*Cosh[a + b*x^2]^2,x]

[Out]

(2*(a + b*x^2) + Sinh[2*(a + b*x^2)])/(8*b)

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.77

method result size
parallelrisch \(\frac {2 b \,x^{2}+\sinh \left (2 b \,x^{2}+2 a \right )}{8 b}\) \(24\)
derivativedivides \(\frac {\frac {\cosh \left (b \,x^{2}+a \right ) \sinh \left (b \,x^{2}+a \right )}{2}+\frac {b \,x^{2}}{2}+\frac {a}{2}}{2 b}\) \(34\)
default \(\frac {\frac {\cosh \left (b \,x^{2}+a \right ) \sinh \left (b \,x^{2}+a \right )}{2}+\frac {b \,x^{2}}{2}+\frac {a}{2}}{2 b}\) \(34\)
risch \(\frac {x^{2}}{4}+\frac {{\mathrm e}^{2 b \,x^{2}+2 a}}{16 b}-\frac {{\mathrm e}^{-2 b \,x^{2}-2 a}}{16 b}\) \(39\)

[In]

int(x*cosh(b*x^2+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/8*(2*b*x^2+sinh(2*b*x^2+2*a))/b

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90 \[ \int x \cosh ^2\left (a+b x^2\right ) \, dx=\frac {b x^{2} + \cosh \left (b x^{2} + a\right ) \sinh \left (b x^{2} + a\right )}{4 \, b} \]

[In]

integrate(x*cosh(b*x^2+a)^2,x, algorithm="fricas")

[Out]

1/4*(b*x^2 + cosh(b*x^2 + a)*sinh(b*x^2 + a))/b

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (24) = 48\).

Time = 0.11 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.94 \[ \int x \cosh ^2\left (a+b x^2\right ) \, dx=\begin {cases} - \frac {x^{2} \sinh ^{2}{\left (a + b x^{2} \right )}}{4} + \frac {x^{2} \cosh ^{2}{\left (a + b x^{2} \right )}}{4} + \frac {\sinh {\left (a + b x^{2} \right )} \cosh {\left (a + b x^{2} \right )}}{4 b} & \text {for}\: b \neq 0 \\\frac {x^{2} \cosh ^{2}{\left (a \right )}}{2} & \text {otherwise} \end {cases} \]

[In]

integrate(x*cosh(b*x**2+a)**2,x)

[Out]

Piecewise((-x**2*sinh(a + b*x**2)**2/4 + x**2*cosh(a + b*x**2)**2/4 + sinh(a + b*x**2)*cosh(a + b*x**2)/(4*b),
 Ne(b, 0)), (x**2*cosh(a)**2/2, True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.23 \[ \int x \cosh ^2\left (a+b x^2\right ) \, dx=\frac {1}{4} \, x^{2} + \frac {e^{\left (2 \, b x^{2} + 2 \, a\right )}}{16 \, b} - \frac {e^{\left (-2 \, b x^{2} - 2 \, a\right )}}{16 \, b} \]

[In]

integrate(x*cosh(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/4*x^2 + 1/16*e^(2*b*x^2 + 2*a)/b - 1/16*e^(-2*b*x^2 - 2*a)/b

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.74 \[ \int x \cosh ^2\left (a+b x^2\right ) \, dx=\frac {4 \, b x^{2} - {\left (2 \, e^{\left (2 \, b x^{2} + 2 \, a\right )} + 1\right )} e^{\left (-2 \, b x^{2} - 2 \, a\right )} + 4 \, a + e^{\left (2 \, b x^{2} + 2 \, a\right )}}{16 \, b} \]

[In]

integrate(x*cosh(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/16*(4*b*x^2 - (2*e^(2*b*x^2 + 2*a) + 1)*e^(-2*b*x^2 - 2*a) + 4*a + e^(2*b*x^2 + 2*a))/b

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.71 \[ \int x \cosh ^2\left (a+b x^2\right ) \, dx=\frac {\mathrm {sinh}\left (2\,b\,x^2+2\,a\right )}{8\,b}+\frac {x^2}{4} \]

[In]

int(x*cosh(a + b*x^2)^2,x)

[Out]

sinh(2*a + 2*b*x^2)/(8*b) + x^2/4